package com.itehima.Buffer;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.Charset;

public class Prac03 {

    public static void main(String[] args) throws IOException {
     //将本地文件的GBK转成UTF-8

        FileReader fr = new FileReader("20240417\\111.txt", Charset.forName("GBK"));
        FileWriter fw = new FileWriter("20240417\\11.txt");
        int b;
        while ((b=fr.read())!=-1)
        {
            fw.write((char)b);
        }
        fw.close();
        fr.close();
    }
}
